Subject: Re: Scene file description
From: Joe Angell <[email-masked]>
To: robert hood <[email-masked]>
Cc: [email-masked]
Date: Fri, 27 Oct 1995 01:38:14 -0400 (EDT)

> There used to be (and probably still is) a document that describes
> the LightWave Scene File format.  Does anybody happen to remember where
> it resides?

AFAIK, there is no LW Scene File Format docs.  There IS, whoever, an 
Object file format, but it is from LW 2.0.  The file is just ASCII, so 
it should be easy to find.  I had to decode it once, so if you need 
specific info, just EMail me.  Here's the hardest part to figure out...

LoadObject Objects/Places/RectRoom/RectRoom
ShowObject 4
ObjectMotion (unnamed)
  9
  1
  1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0
  0 0 0.0 0.0 0.0
EndBehavior 1
LockedChannels 29
ParentObject 5
ShadowOptions 7

LoadObject refers to an object to load, including path.  Simple.

ShowObject x refers to the method of displaying the object in layout 
	(All, Points, Every-Other Polygon, None, Box... I don't remember the 
	order, but it is the same as in Layout.)

ObjectMotion (unnamed)  This is the actual keyframe information.  I think 
	(unnamed) changes to the file of a loaded motion if you loaded a Motion 
	File in, but I'm not sure (just a theory...)
  9	I have no idea what this number means.  AFAIK, it is always 9.

  1	The number of keyframes total for this item (see WAY below...)
  
  1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0  These are Position, Rotation & Scale
   |   |   |   |   |   |   |   |   +- Z Scale
   |   |   |   |   |   |   |   +----- Y Scale
   |   |   |   |   |   |   +--------- X Scale
   |   |   |   |   |   +------------- Bank (Rotation)
   |   |   |   |   +----------------- Pitch (Rotation)
   |   |   |   +--------------------- Heading (Rotation)
   |   |   +------------------------- Z Position
   |   +----------------------------- Y Position
   +--------------------------------- X Position

   0 0 0.0 0.0 0.0	These are the Spline settings and keyframe #.
   | |  |   |   +-- Bias (-1 to 1)
   | |  |   +------ Continuity (-1 to 1)
   | |  +---------- Tension (-1 to 1)
   | +------------- I have no idea
   +--------------- Current kryframe #

   EndBehavior x represents the End Behavior buttion in the Motion Graph, 
	in the same order as they appear there (Stop, Repeat or Reset)

   LockedChannels x are the channels that are locked (ie: not able to be 
	rotated/moved/scaled around, which is set by de-selecting an axis
	in Layout).  I'm not sure what the number mean, but it should be 
	easy to figure out.

   ParentObject x is the # object that the current item is parented to.  
	I THINK the object numbers start from 0, and I KNOW the object # 
	is assigned when the object is loaded (the 1st object loaded is 0, the 
	2nd is 1, and so on.

   ShadowOptions x are the options selected for shadows.  I'm not sure 
	how this number works, either, but should be easy to find out by trial & 
	error...

Now, if you have more than 1 keyframe (say, 3), the # of keyframes is set to 
that # (in this case, 3).  Then the settings for the 3 keyframes are 
listed below.  For example...

ObjectMotion (unnamed)
  9				  ; Dunno
  3				  ; # of keyframes total
  0.36 0.3 -0.32 0 0 0 1 1 1	  ; Position, Rotation & Size for Frame 0
  0 0 0 0 0			  ; Frame # (0) and spline settings
  0.36 0.3 -0.32 -25.4 0 0 1 1 1  ; Position, Rotation & Size for Frame 1
  1 0 0 0 0			  ; Frame # (1) and spline settings
  0.36 0.3 -0.32 -50.4 0 0 1 1 1  ; Position, Rotation & Size for Frame 5
  5 0 0 0 0			  ; Frame # (5) and spline settings

That's about it.  Good luck!

-- Joe
--
Joe Angell <[email-masked]> sent this message.
To Post a Message           : [email-masked]
Un/Subscription Requests To : [email-masked]
(DIGEST)                 or : [email-masked]
Administrative Items To     : [email-masked]